Add SGLang Qwen3-8B torch.profiler harness and per-component latency classifier#264
Closed
chhwang wants to merge 4 commits into
Closed
Add SGLang Qwen3-8B torch.profiler harness and per-component latency classifier#264chhwang wants to merge 4 commits into
chhwang wants to merge 4 commits into
Conversation
…filer for both prefill and decode phases; write PROFILE.md with a ranked per-component latency budget that re-ranks Q4–Q8.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #264 +/- ##
=======================================
Coverage 85.70% 85.70%
=======================================
Files 129 129
Lines 6457 6457
=======================================
Hits 5534 5534
Misses 923 923 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…filer for both prefill and decode phases; write PROFILE.md with a ranked per-component latency budget that re-ranks Q4–Q8.
The CUDA UnitTest job OOM-kills during 'apt-get install lcov' because fontconfig-config and its recommended packages exhaust container memory. Adding --no-install-recommends avoids pulling those heavy deps.
…onent latency budget for prefill and decode, write PROFILE.md with ranked breakdown and targets
Contributor
Author
|
Closing: the SGLang baseline/profiling harness is kept local for evaluation only and will not be merged into this repo. Only the ARK implementation lands here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add SGLang Qwen3-8B torch.profiler harness and per-component latency classifier
Q2 of the Qwen3-on-ARK initiative: instrument SGLang's Qwen3-8B forward
with torch.profiler to produce a ranked per-component latency budget for
both prefill and decode phases.
New files under
examples/qwen3/:bench/profile_sglang.py— HTTP client that drives SGLang's/start_profile//stop_profileendpoints for prefill (prompt=2048,max_new_tokens=1) and decode (prompt=2048, max_new_tokens=128) phases.
Configurable schedule (wait=2, warmup=1, active=3), record_shapes,
with_stack.
bench/classify_kernels.py— classifies Chrome-trace kernel events intoseven component buckets (attention, gemm_attention, gemm_mlp, nccl,
norms_rope, embed_lm_head, other) using name-pattern matching and
shape-based GEMM disambiguation for Qwen3-8B at TP=8.
bench/analyze_profile.sh— runs the torch-profiler skill'strace_analyzer.py then classify_kernels.py, writing results to an
analysis/ directory.
bench/test_profile_sglang.py— 40+ CPU-only unit tests covering kernelclassification, GEMM shape disambiguation, profiler config construction,
argument parsing, and budget formatting.
PROFILE.md— template with per-component tables for prefill and decode;numbers filled out-of-band after profiling on 8×A100.
bench/reproduce_profile.md— step-by-step reproduction instructions.CI fix: add
--no-install-recommendstoapt-get install lcovin.github/workflows/ut.ymlto prevent OOM kill (exit 137) fromfontconfig-config dependency tree on the self-hosted CUDA runner.